In density logging, scintillation detectors measure radiation from a formation to estimate the electron density and photoelectric factor of the formation. The energy of detected radiation is measured and quantized into “counts.” The counts are binned into “channels” depending on their energy. The energy associated with each channel can change as the function of temperature and detector age. Stabilizing the spectrum, so that each channel corresponds to a known energy, is a challenge.